package com.yjd.pub.system.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yjd.comm.base.dao.IBaseDao;
import com.yjd.comm.base.service.impl.BaseServiceImpl;
import com.yjd.comm.system.model.DemoModel;
import com.yjd.comm.system.service.IDemoService;
import com.yjd.pub.system.dao.IDemoDao;

/**
 * <b>description</b>：TODO <br>
 * <b>time</b>：2014-11-4上午9:26:55 <br>
 * <b>author</b>： ready likun_557@163.com
 */
@Service("demoService")
public class DemoServiceImpl extends BaseServiceImpl implements IDemoService {

	@Override
	public DemoModel insert(DemoModel model) throws Exception {
		return this.demoDao.insertModel(model, true);
	}

	@Override
	public int update(DemoModel model) throws Exception {
		return this.demoDao.updateModel(model, true);
	}

	@Override
	public int delete(Long id) throws Exception {
		return this.demoDao.deleteById(id, true);
	}

	@Resource
	private IDemoDao demoDao;

	@Override
	public IBaseDao getBaseDao() {
		return this.demoDao;
	}

}
